<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>登录页</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link rel="stylesheet" type="text/css" href="js/bootstrap/css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="js/bootstrap/css/bootstrap-theme.min.css">
    <script src="js/angularjs/angular.js"></script>
    <script src="js/jquery/jquery-3.2.1.min.js"></script>
    <script src="js/bootstrap/js/bootstrap.min.js"></script>
    <script src="js/websocket/reconnecting-websocket.min.js"></script>
    <script src="js/login/login.js"></script>
  </head>
  
  <body>
<form method="post" ng-app="myApp" ng-controller="validateCtrl" 
name="myForm" novalidate  action="login/loginin.do">

<p>用户名:<br>
<input type="text" name="username" id="username" ng-model="username" required>
<span style="color:red" ng-show="myForm.username.$dirty && myForm.username.$invalid">
<span ng-show="myForm.username.$error.required">用户名是必须的。</span>
</span>
</p>

<p>邮箱:<br>
<input type="password" name="password" ng-model="password" required>
<span style="color:red" ng-show="myForm.password.$dirty && myForm.password.$invalid">
<span ng-show="myForm.password.$error.required">密码是必须的。</span>
</span>
</p>

<p>
<input type="submit"
ng-disabled="myForm.username.$dirty && myForm.username.$invalid ||  
myForm.password.$dirty && myForm.password.$invalid">
</p>

</form>
  <button class="btn btn-default" type="button" id="send">发送</button>  
<div id="tou"></div>
<div id="msg"></div>
<div id="tou"></div>
<script>
var app = angular.module('myApp', []);
app.controller('validateCtrl', function($scope) {
    $scope.username = '01';
    $scope.password = '1';
});
</script>

   <!--  登录页<br>
    <form method="post" action="login/loginin.do">
       用户名： <input type="text" id="username" name="username"/>
   密码：<input type="password" id="password" name="password"/>
    <input type="submit" name="提交">
    </form> -->

  </body>
</html>
